{% extends "backend/base.html" %}
{% block title %}
    运行日志查看
{% endblock %}
{% block content %}
    <main>
        <div class="container">
            <h3><b>运行日志查看</b></h3>
            <div class="table-responsive">
                {% if logs %}
                    <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>文件名</th>
                        <th>描述</th>
                        <th>更新时间</th>
                        <th>存储路径</th>
                        <th>大小</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for log in logs %}
                        <tr>
                            <td><i class="fa fa-file-text-o"></i> {{ log[0] }}</td>
                            <td><i class="fa fa-contao"></i> {{ log[1] }}</td>
                            <td><i class="fa fa-clock-o"></i> {{ log[2] }}</td>
                            <td><i class="fa fa-folder-o"></i> {{ log[3] }}</td>
                            <td><i class="fa fa-signal"></i> {{ log[4] }}</td>
                            <td>
                                <button class="btn btn-info" style="margin-bottom: 3px;"><a title="查看日志" style="color: inherit; text-decoration: none;" href="/backend/logs/detail/{{ log[3] }}/">查看</a></button>
                                <button class="btn btn-success" style="margin-bottom: 3px;"><a title="下载备份日志" style="color: inherit; text-decoration: none;" href="/backend/logs/download/?filename={{ log[3] }}">备份</a></button>
                            </td>
                        </tr>
                    {% endfor %}
                {% endif %}
                </tbody>
                </table>
            </div>
        </div>
    </main>

{% endblock %}